package com.jason.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 创建主题，设置分区，副本
 */
@Configuration
public class BeanConfig {

    @Bean("initTopic")
    public NewTopic initTopic(){
        return new NewTopic("topic_test", 3, (short)1);
    }
}
